<template>
  <div :class="'card-rows card-rows-'+(rowIndex)">
    <template v-for="(item,index) in list">
      <div :key="index">
        <div class="card" :style="'border: 1px solid '+item.color" @click="getMarketTeam(item.id)">
          <div class="title" :style="'background-color:'+item.color">{{item.level_name}}</div>
          <div class="text" v-if="item.total_money>=0" :style="'border-bottom: 1px solid '+item.color">总业绩:{{item.total_money}}</div>
          <div class="qu" v-if="item.left_money>=0 || item.right_money>=0">
            <div class="name">
              <span>A区</span>
              <span>{{item.left_money}}</span>
            </div>
            <div class="name" :style="'border-left: 1px solid '+item.color">
              <span>B区</span>
              <span>{{item.right_money}}</span>
            </div>
          </div>
        </div>
      </div>
      <card-rows :list="item.sub" v-if="item.sub.length > 0" :rowIndex="rowIndex +1" :key="index" />
    </template>
  </div>
</template>
<script>
export default {
  name: 'CardRows',
  data () {
    return {
    };
  },
  props: {
    list: {
      type: Array
    },
    rowIndex: {
      type: Number,
      default: 1
    }
  },
  methods: {

  }
};
</script>
<style scoped lang="less">
.login {
  height: 100%;
}
</style>
